#include <cstdio>
using namespace std;

#define VECTOR_SIZE 10
void CopyVector(int[], int[]);
void RefreshVector(int[], int[], int);

int main()
{
    int old_vector[VECTOR_SIZE] = {0}, vector[VECTOR_SIZE] = {0};
    vector[0] = 1;
    int level;
    scanf(" %d", &level);
    for (int i = 0; i < level; i++) {
        CopyVector(old_vector, vector);
        for (int j = 0; j <= i; j++) {
            printf("%d ", old_vector[j]);
        }
        RefreshVector(old_vector, vector, i + 1);
        printf("\n");
    }   
}

void CopyVector(int old_vector[], int vector[])
{
    for (int i = 0; i < VECTOR_SIZE; i++)
        old_vector[i] = vector[i];
}

void RefreshVector(int old_vector[], int vector[], int num)
{
    for (int i = 1; i < num; i++)
        vector[i] = old_vector[i - 1] + old_vector[i];
    vector[num] = 1;
}